<template>
  <div class='manage-ig'>
    <p class="title">{{title}} <el-button v-for="(item,index) in btnsData" :key="index" :type="item.type" class="btn-add fr" @click="item.click">{{item.label}}</el-button>
    </p>
    <div class="table-box">
      <Table :modelData="modelData" :listData="listData" :pageInfo="pageInfo"></Table>
    </div>
  </div>
</template>
<script>
import Table from '../../components/table'
export default {
  components: {Table},
  name: "",
  data() {
    return {
      title:"议题评分管理",
      btnsData:[
        {label:"停止",type:'danger',click:this.end},
        {label:"开启",type:'success',click:this.start},
      ],
      modelData:[
        {myType:'index',label:"序号"},
        {myType:'normal',prop:"",label:'议题名称'},
        {myType:'normal',prop:"",label:'组长信息'},
        {myType:'normal',prop:"",label:'评分'},
        {myType:'normal',prop:"",label:'总分'},
        {myType:'operate',label:'管理',btns:[
          {label:'编辑',click:this.edit,icon:require('../../assets/images/manageHome/edit.png')},
          // {label:'删除',click:this.delete,icon:require('../../assets/images/manageIssues/delete.png')}
        ],width:"100"}
      ],
      listData:[{}],
      pageInfo:{
        page:1,
        total:10,
        size:10,
        changePage:this.changePage
      }
    };
  },
  methods: {
    // 开始
    start(){
      console.log("开始")
    },
    // 停止
    end(){
      console.log("停止")
    },
    
    // 新增
    add() {
      this.$store.state.add.show = true;
    },
    edit(scope) {
      this.add();
    },
    // 删除
    delete(scope) {
      this.$store.state.confirmInfo.message = "是否确认删除？";
      this.$store.state.confirmInfo.show = true;
    },
    // 翻页
    changePage() {}
  },
  created() {}
};
</script>
<style lang="scss" scoped>
.manage-ig {
  width: 100%;
  height: 100%;
  padding: 10px;
  box-sizing: border-box;
  overflow: auto;

  .title {
    font-weight: 600;
    font-size: 20px;
    background-color: #fff;
    text-indent: 20px;
    height: 60px;
    line-height: 60px;
    box-sizing: border-box;
    border-bottom: 1px solid #ebeef5;
  }
  .table-box {
    height: calc(100% - 60px);
  }
}
</style>